package com.usian.dao;
import com.usian.pojo.Zd;
import com.usian.pojo.Zhi;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface ZhiMapper extends tk.mybatis.mapper.common.Mapper<Zhi> {


    @Delete("delete from zhi where id=#{id}")
    void deleteZhi(Integer id);
@Select("select z.id,z.zname,d.`dname` from zhi z,dept d where z.`did`=d.`id` and z.id=#{id}")
    Zd findByid(Integer id);
@Select("select id from dept where dname=#{zname}")
Integer findIdByZname(@Param("zname") String zname);
@Select("select * from zhi")
    List<Zhi> findZhi();
}